package com.linln.modules.system.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.linln.common.enums.StatusEnum;
import com.linln.common.utils.StatusUtil;
import lombok.Data;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author 小懒虫
 * @date 2018/12/02
 */
@Data
@Entity
@Table(name = "sys_expert")
@EntityListeners(AuditingEntityListener.class)
@Where(clause = StatusUtil.NOT_DELETE)
public class Expert implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /** 专家姓名 */
    private String name;

    private Integer level;
    private Integer techTitle;
    private String hosName;
    private String intro;
    private String goodAt;
    private String headimg;

    /** 创建时间 */
    @CreatedDate
    private Date createDate;

    /** 更新时间 */
    @LastModifiedDate
    private Date updateDate;

    /** 数据状态 */
    private Byte status = StatusEnum.OK.getCode();
}
